package com.zulu.karaoke.database;


public class DatabaseManager {
	private DatabaseHelper mDbHelper;
	private SongTableHelper instanceSongListHelper;
	
	private static DatabaseManager instance = null;
//	private static Context mContext = null;

//	public static synchronized DatabaseManager getInstance(Context context) {
//		if (instance == null) {
//			instance = new DatabaseManager(context);
////			mContext = context;
//		}
//		mContext = context;
//		return instance;
//	}
	
	public static synchronized DatabaseManager getInstance() {
		if (instance == null) {
			instance = new DatabaseManager();
//			mContext = context;
		}
//		mContext = context;
		return instance;
	}
	
//	public static synchronized DatabaseManager getInstance() {
//		if (instance == null) {
//			instance = new DatabaseManager();
////			mContext = context;
//		}
////		mContext = context;
//		return instance;
//	}

//	private DatabaseManager(Context context) {
//		this.mDbHelper = new DatabaseHelper(context);
//	}
	
	private DatabaseManager() {
		this.mDbHelper = new DatabaseHelper();
	}

	public SongTableHelper getSongTableHelper() {
		if (instanceSongListHelper == null)
			instanceSongListHelper = new SongTableHelper(mDbHelper);
		return instanceSongListHelper;
	}
	
}
